package java3_14;

import java.util.Scanner;

public class Stu_application {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        StudentClass stu = new StudentClass();
        stu.className = "Java83班";
        stu.teacherName = "老刘";
        stu.date = "2023-2-20";
        System.out.println("班级信息如下:");
        System.out.println("班级名称是："+stu.className+"\n"+"教学老师是："+stu.teacherName+"\n"+"开班日期是："+stu.date);
        while (true){
            System.out.println("1.添加学生信息  2.获取班级人数  3.退出");
            int x = scanner.nextInt();
            switch (x){
                case 1:{
                    System.out.println("请输入要添加的学生姓名：");
                    String newName = scanner.next();
                    stu.add(newName);
                    break;
                }
                case 2:{
                    int y = stu.inquire();
                    System.out.println("班级的人数为："+y);
                    break;
                }
                case 3:{
                    return;
                }
            }
        }
    }
}
